#include "Solution.h"

int main() {
	Solution s;

#pragma region
	string s1 = "Hello World";
	cout << "s1 is \"Hello World\"" << endl;
	string s2 = s1;
	cout << "s2 is initialized by s1" << endl;
	string s3(s1);
	cout << "s3 is initialized by s1" << endl;
	// compare by '=='
	cout << "Compared by '==':" << endl;
	cout << "s1 and \"Hello World\": " << (s1 == "Hello World") << endl;
	cout << "s1 and s2: " << (s1 == s2) << endl;
	cout << "s1 and s3: " << (s1 == s3) << endl;
	// compare by 'compare'
	cout << "Compared by 'compare':" << endl;
	cout << "s1 and \"Hello World\": " << !s1.compare("Hello World") << endl;
	cout << "s1 and s2: " << !s1.compare(s2) << endl;
	cout << "s1 and s3: " << !s1.compare(s3) << endl;

	/*vector<int> nums1 = stringToIntegerVector("[1,2]");
	vector<int> nums2 = stringToIntegerVector("[3,4]");
	s.findMedianSortedArrays(nums1, nums2);*/
		/*vector<vector<int>> matrix{ {1}, {3} };
		s.searchMatrix(matrix, 2);*/
	//s.isIsomorphic("egg", "add");
	//s.multiply("2333", "11037");
	//cout << s.myPow(1.0, 2147483647) << endl;
	/*vector<int> player1 = stringToIntegerVector("[10,2,2,3]");
	vector<int> player2 = stringToIntegerVector("[3,8,4,5]");
	s.isWinner(player1, player2);*/
	//s.repeatedSubstringPattern("babbabbabbabbab");
	/*vector<int> nums = stringToIntegerVector("[34, 23, 1, 24, 75, 33, 54, 8]");
	s.sumOfDigits(nums);*/
	/*vector<int> arr = stringToIntegerVector("[1,3,2,3,5,0]");
	s.countElements(arr);*/
	//s.confusingNumber(6);

	/*vector<int> A = stringToIntegerVector("[13,-3,-25,20,-3,-16,-23,18,20,-7,12,-5,-22,15,-4,7]");
	handleAllSubArrays(A, [](const vector<int>& subArray) {
		for (int i = 0; i < subArray.size(); i++) {
			cout<<subArray[i]<<" ";
		}
		cout << endl;
	});*/
	//printVector<int>(findMaxCrossingSubArray(A, 0, A.size() - 1));
	//vector<int> a = stringToIntegerVector("[5,2,4,6,1,3]");
	//printVector<int>(insertionSort(a));
	//printVector<int>(mergeSort(a));
	/*s.makeGood("leEeetcode");
	s.pivotInteger(8);
	s.countPoints("B0R0G0R9R0B0G0");*/

	/*vector<int> flowerbed = stringToIntegerVector("[1,0,0,0,1]");
	s.canPlaceFlowers(flowerbed, 2);*/

	//s.makeFancyString("a");

	/*vector<int> nums1 = stringToIntegerVector("[2,15,10,11,14,12,14,11,9,1]");
	vector<int> nums2 = stringToIntegerVector("[8,9,13,2,11,8]");
	vector<int> nums3 = stringToIntegerVector("[13,5,15,7,12,7,8,3,13,15]");
	s.twoOutOfThree(nums1, nums2, nums3);*/

	/*Codec* ser = new Codec();
	Codec* deser = new Codec();
	string tree = ser->serialize(stringToTreeNode("[2,1,3]"));
	TreeNode* ans = deser->deserialize(tree);*/
	/*vector<int> forts = stringToIntegerVector("[1,0,0,-1,0,0,0,0,1]");
	s.captureForts(forts);*/
	//s.waysToBuyPensPencils(20, 10, 5);
	/*vector<int> nums = stringToIntegerVector("[1, 3, 3, 2]");
	s.isGood(nums);*/
	/*s.countLargestGroup(13);
	auto gifts = stringToIntegerVector("[25,64,9,4,100]");
	s.pickGifts(gifts, 4);*/
	//cout << s.reformatDate("20th Oct 2052").c_str() << endl;
	//s.reformat("a0b1c2");
	//s.distMoney(20, 3);
	//s.thousandSeparator(1234);
	//s.splitNum(10);
	//s.countDaysTogether("08-15", "08-18", "08-16", "08-19");
	//s.circularGameLosers(5, 2);
	//s.mergeTrees(stringToTreeNode("[1,3,2,5]"), stringToTreeNode("[2,1,3,null,4,null,7]"));
	//s.digitSum("11111222223", 3);
	//s.divisorSubstrings(240, 2);
	//s.greatestLetter("lEeTcOdE");
	/*vector<int> nums = stringToIntegerVector("[1,0,0,0,1,0,0,1]");
	s.kLengthApart(nums, 2);*/
	/*vector<int> nums = stringToIntegerVector("[2,1,3,3]");
	s.maxSubsequence(nums, 2);*/
	/*vector<int> nums = stringToIntegerVector("[4,5,2,1]");
	vector<int> queries = stringToIntegerVector("[3,10,21]");
	s.answerQueries(nums, queries);*/
	/*vector<int> cost = stringToIntegerVector("[3,3,3,1]");
	s.minimumCost(cost);*/
	/*vector<int> nums = stringToIntegerVector("[9,5,7,8,7,9,8,2,0,7]");
	s.distinctAverages(nums);*/
	//s.sortEvenOdd(nums);
	/*vector<string> demand = { "acd","bed","accd" };
	s.minNumBooths(demand);*/
	//s.largestInteger(4173);
	//s.rearrangeCharacters("ilovecodingonleetcode", "code");
	//s.reverseBits(-1);
	/*vector<int> nums = stringToIntegerVector("[0,1,2,2,4,4,1]");
	s.mostFrequentEven(nums);*/
	//s.countAsterisks("l|*e*et|c**o|*de|");
	/*auto&& distance = stringToIntegerVector("[1,3,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]");
	s.checkDistances("abaccb", distance);*/
	//s.areNumbersAscending("a puppy has 2 eyes 4 legs");
	//s.decodeMessage("eljuxhpwnyrdgtqkviszcfmabo", "zwx hnfx lqantp mnoeius ycgk vcnjrdb");
	//s.percentageLetter("vmvvvvvzrvvpvdvvvvyfvdvvvvpkvvbvvkvvfkvvvkvbvvnvvomvzvvvdvvvkvvvvvvvvvlvcvilaqvvhoevvlmvhvkvtgwfvvzy", 'v');
	//s.numDifferentIntegers("a123bc34d8ef34");
	/*vector<int> nums = stringToIntegerVector("[20,30,28,23,15,48,0,47,0,70,77,76,62,64,55,68,76,71,99,63]");
	s.partitionDisjoint(nums);*/
	//vector<int> temp{ 4,2,1 };
	//s.minCount(temp);
	//s.mergeTwoLists(nullptr, nullptr);
	/*auto temp = stringToIntegerVector("[6,0,7,0,7,5,7,8,3,4,0,7,8,1,6,8,1,1,2,4,8,1,9,5,4,3,8,5,10,8,6,6,1,0,6,10,8,2,3,4]");
	s.trimMean(temp);*/
	//s.numberOfSteps(14);
	/*auto temp = stringToIntegerVector("[8, 4, 6, 2, 3]");
	s.finalPrices(temp);*/
	//auto temp = stringToIntegerVector("[1,12,-5,-6,50,3]");
	//s.validMountainArray(temp);
	//s.findMaxAverage(temp, 4);
	//s.sortString("aaaabbbbcccc");
	/*auto temp = stringToIntegerVector("[2, 4, 9, 3]");
	s.decrypt(temp, -2);*/
	//s.isLongPressedName("alex", "aaleex");
	/*auto temp = stringToIntegerVector("[-10, -3, 0, 5, 9]");
	s.sortedArrayToBST(temp);*/
	/*auto temp = stringToIntegerVector("[1]");
	s.removeElement(temp, 1);*/
	//cout<< treeNodeToString(s.increasingBST(stringToTreeNode("[2,1,4,null,null,3]"))) <<endl;
	//combinString(splitString("is2  sentence4  This1  a3", "  "), ",");
	/*auto temp = stringToIntegerVector("[1,6,3,1,2,5]");
	s.maxIceCream(temp, 20);*/
	/*auto temp = stringToIntegerVector("[5,2]");
	s.swapNumbers(temp);*/
	/*auto temp = stringToIntegerVector("[5,2,3,7,4,6]");
	selection_sort(temp);*/
	/*string data = readDataFile();
	auto temp = stringToIntegerVector(data);
	s.totalHammingDistance(temp);*/
	/*auto commands = stringToIntegerVector("[4,-1,3]");
	vector<vector<int>> obstacles = { {} };
	s.robotSim(commands, obstacles);*/
	//s.checkZeroOnes("111000");
	/*vector<vector<int>> image = { {1, 1, 1} ,{1, 1, 0},{1, 0, 1} };
	s.floodFill(image, 1, 1, 2);*/
	/*auto temp = stringToIntegerVector("[1,2,3]");
	s.checkSubarraySum(temp, 5);*/
	/*auto temp = stringToIntegerVector("[9, 29, 49, 50]");
	s.slowestKey(temp, "cbcd");*/
	/*s.maxRepeating("aaabaaaabaaabaaaabaaaabaaaabaaaaba",
		"aaaba");*/
		/*vector<vector<int>> relation = { {0, 2} ,{2, 1},{3, 4},{2, 3},{1, 4},{2, 0},{0, 4} };
		s.numWays(5, relation, 3);*/
		//s.getMaximumGenerated(11);
		/*vector<int> arr = stringToIntegerVector("[40,10,20,30]");
		s.arrayRankTransform(arr);*/
		/*string data = readDataFile();
		auto temp = stringToIntegerVector(data);
		s.maximumElementAfterDecrementingAndRearranging(temp);*/
		/*string data = readDataFile();
		auto temp = stringToIntegerVector(data);
		auto result = s.twoSum(temp, 7828670);*/
		//s.generate(5);
		/*string data = readDataFile();
		auto temp = stringToCharVectorVector(data, '@');
		cout<< "isValidSudoku " << s.isValidSudoku(temp) << endl;*/
		/*auto temp = stringToIntegerVectorVector("[[1,1,1]@[1,0,1]@[1,1,1]]", '@');
		s.setZeroes(temp);*/
		//s.firstUniqChar("leetcode");
		/*auto temp = stringToIntegerVector("[3,2,1]");
		s.thirdMax(temp);*/
		//s.findComplement(5);
		/*vector<string> words = { "Hello","Alaska","Dad","Peace" };
		s.findWords(words);*/
		/*vector<int> original = stringToIntegerVector("[1,2,3,4]");
		s.construct2DArray(original, 2, 2);*/
		/*vector<int> nums = stringToIntegerVector("[0,1,2,4,5,7]");
		s.summaryRanges(nums);*/
		//s.uncommonFromSentences("this apple is sweet", "this apple is sour");
		/*vector<int> nums = stringToIntegerVector("[2,3,-1,8,4]");
		s.findMiddleIndex(nums);*/
		//s.reverseWords("  hello world!  ");
		/*auto numbers = stringToIntegerVector("[1,2,4,6,10]");
		s.twoSum(numbers, 8);*/
		/*vector<int> nums = stringToIntegerVector("[4, 5, 8, 2]");
		KthLargest kthLargest(3, nums);
		cout << kthLargest.add(3) << endl;
		cout << kthLargest.add(5) << endl;
		cout << kthLargest.add(10) << endl;
		cout << kthLargest.add(9) << endl;
		cout << kthLargest.add(4) << endl;*/
		//s.maxNumberOfBalloons("nlaebolko");
		//cout << s.guessNumber(10) << endl;
		/*auto temp = stringToIntegerVectorVector("[[1],[2],[3],[4],[7],[6],[5]]");
		s.shiftGrid(temp, 23);*/
		/*vector<int> nums = stringToIntegerVector("[4, 5, 8, 2]");
		auto temp = rotate(nums, 2);*/
		/*vector<int> nums = stringToIntegerVector("[1]");
		s.searchRange(nums, 0);*/
		/*auto arr = stringToIntegerVector("[2,3,4,7,11]");
		s.findKthPositive(arr, 5);*/
		/*vector<int> nums = stringToIntegerVector("[4,3,10,9,8]");
		s.minSubsequence(nums);
		s.digitCount("1210");*/

		/*TripleInOne* obj = new TripleInOne(1);
		obj->push(0, 1);
		obj->push(0, 2);
		int param_1 = obj->pop(0);
		int param_2 = obj->pop(0);
		int param_3 = obj->pop(0);
		int param_3 = obj->peek(stackNum);
		bool param_4 = obj->isEmpty(0);*/

		/*String s1("Hello World!");
		String s2 = (s1);
		String s3;
		s2 += s1;
		s3 = s1 + s1;
		cout<<s3.c_str()<<endl;*/
#pragma endregion

	system("pause");
	return 0;
}